<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form" %>  
<form:form modelAttribute="teacher" cssClass="form-horizontal">
	<div class="form-group">
		<label class="col-sm-2 control-label">姓名</label>
		<div class="col-sm-7">
			<form:input path="name" cssClass="form-control" maxlength="20"/>
		</div>
		<div class="col-sm-3">
			<form:errors path="name" cssStyle="color:red"/>
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-2 control-label">性别</label>
		<div class="col-sm-7">
			<form:radiobuttons path="gender" items="${genders}" itemLabel="text"/>
		</div>
		<div class="col-sm-3"></div>
	</div>
	<div class="form-group">
		<label class="col-sm-2 control-label">年龄</label>
		<div class="col-sm-7">
			<form:input path="age" cssClass="form-control" maxlength="5"/>
		</div>
		<div class="col-sm-3">
			<form:errors path="age" cssStyle="color:red"/>
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-2"></label>
		<div class="col-sm-10">
			<input type="submit" class="btn btn-primary" value="${teacher.id==null?'添加':'修改' }"/>
			<a href="${ctx}/teachers" class="btn btn-info">返回</a>
		</div>
	</div>
</form:form>